package com.study.app.domain.bo;

import com.study.common.core.validate.AddGroup;
import com.study.common.core.validate.EditGroup;
import com.study.common.core.validate.QueryGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class AppUserAddressBo {

    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long id;

    @NotBlank(message = "用户code不能为空", groups = {QueryGroup.class, AddGroup.class, EditGroup.class})
    private String userCode;

    /**
     * 用户联系电话（加密）
     */
    @NotBlank(message = "用户联系电话不能为空", groups = {AddGroup.class, EditGroup.class})
    private String userPhone;

    /**
     * 行政区域省分ID
     */
    @NotNull(message = "省分不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer provinceId;

    /**
     * 行政区域省市区ID
     */
    @NotNull(message = "市区不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer cirtyId;

    /**
     * 行政区域城镇ID
     */
    @NotNull(message = "城镇不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer areaId;

    /**
     * 收货详细地址
     */
    @NotBlank(message = "详细地址不能为空", groups = {AddGroup.class, EditGroup.class})
    private String address;

    /**
     * 是否为默认地址 ： 1是 ，2否
     */
    @NotNull(message = "是否为默认不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer isDefault;

}
